﻿<UserControl x:Class="TechNewLogic.GraphIT.Hv.CurveRectControl"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:Core="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
		mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300" x:Name="root"
		x:ClassModifier="internal">

	<Grid x:Name="LayoutRoot" DataContext="{Binding ElementName=root}"
			MouseEnter="CurveRect_MouseEnter" MouseLeftButtonDown="CurveRect_MouseLeftButtonDown"
			MouseLeave="CurveRect_MouseLeave">

		<VisualStateManager.CustomVisualStateManager>
			<Core:ExtendedVisualStateManager />
		</VisualStateManager.CustomVisualStateManager>

		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="CommonStates">
				<VisualState x:Name="Normal" />
				<VisualState x:Name="Selected">
					<Storyboard>
						<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.9"
								Storyboard.TargetName="fillRect" Duration="0:0:0.15" />
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Invisible">
					<Storyboard>
						<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0"
								Storyboard.TargetName="fillRect" Duration="0:0:0.15" />
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>

		<Rectangle x:Name="fillRect" Opacity="0.5">
			<Rectangle.Fill>
				<SolidColorBrush Color="{Binding Curve.Stroke}" />
			</Rectangle.Fill>
		</Rectangle>

		<Rectangle x:Name="strokeRect" StrokeThickness="1">
			<Rectangle.Stroke>
				<SolidColorBrush Color="{Binding Curve.Stroke}" />
			</Rectangle.Stroke>
		</Rectangle>

	</Grid>

</UserControl>
